<div class="SubMainTitle">
	<b class="FT14">友情链接 </b>
</div>
<div class="Mylist">
<table width="95%" border="0" align="center" cellpadding="5" cellspacing="0">
    <tr>
      <td width="22%" class="b">名称</td>
      <td width="45%" class="b">网址</td>
      <td width="14%" class="b">排序</td>
      <td width="19%" class="b">操作</td>
    </tr>
    <? if(is_array($rs)){foreach($rs as &$v){?>
    <form method="post" onsubmit="return XypForm(this)"  action="act.php">
    <tr ondblclick="modifyManageSort(<?=$v["id"]?>);">
      <td id="cidn_<?=$v["id"]?>"><?=$v["siteName"]?></td>
      <td id="cidu_<?=$v["id"]?>"><?=$v["url"]?></td>
      <td id="cidt_<?=$v["id"]?>"><?=$v["taxis"]?></td>
      <td id="action_<?=$v["id"]?>"><a href="javascript:modifyManageSort(<?=$v["id"]?>)">更改</a>/<a 
      		 href="<?=surl::get("my")."act.php?Pact=delManageFriendlink&id=".$v["id"]?>">刪除</a></td>
    </tr>
    <input type="hidden" name="id" value="<?=$v["id"]?>" />
    <input type="hidden" name="Pact" value="modifyManageFriendlink" />
    </form>
    <? }}?>
</table>
<br />
<hr />
<table width="95%" border="0" align="center" cellpadding="5" cellspacing="0">
     <tr>
      <td colspan="2" class="b"><a href="#" onclick="var addUserAddr=_.e('addUserAddr').style;if(addUserAddr.display=='none'){ addUserAddr.display =''}else{addUserAddr.display='none'}"
      ><b>添加新的友情链接</b></a></td>
    </tr>
</table>
<div style="display:none" id="addUserAddr">
<form id="setManageFriendlink" name="setManageFriendlink" onsubmit="return XypForm(this)"  method="post" action="act.php">
<table width="95%" border="0" align="center" cellpadding="5" cellspacing="0">
    <tr>
      <td width="15%" align="right">友情链接名称：</td>
      <td width="85%"><input name="siteName" require="1" type="text"  size="20" id="className"/>
        *</td>
    </tr>
    <tr>
      <td width="15%" align="right">网址：</td>
      <td width="85%"><input name="url" require="1"  dataType="url" type="text"  size="30" id="url"/>
        *</td>
    </tr>
    <tr>
      <td align="right">排序：</td>
      <td><input name="taxis" require="1" dataType="nums" type="text" size="8" id="taxis" />
        *</td>
    </tr>
    
    
    <tr>
      <td colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input type="submit" class="submitMini" value="添加新的分类">
        <input type="hidden" name="Pact" value="setManageFriendlink" />
        &nbsp;&nbsp;   
        <input type="reset" class="submitMini"></td>
    </tr>
</table>
 </form>
</div>
</div>
<script type="text/javascript">
var oo = {};
var modifyManageSort = function(id)
{
	var o= oo[id],cidn = _.e('cidn_'+id),cidu = _.e('cidu_'+id),cidt = _.e('cidt_'+id),action = _.e('action_'+id);
	if(o)
	{
		cidn.innerHTML =  o.siteName;
		cidu.innerHTML =  o.url;
		cidt.innerHTML =  o.taxis;
		action.innerHTML = o.action;
		o = 0;
	}else
	{
		o ={};
		o.siteName = cidn.innerHTML;
		o.url      = cidu.innerHTML;
		o.taxis  = cidt.innerHTML;
		o.action = action.innerHTML;
		cidn.innerHTML = '<input name="siteName" type="text" require="1"  value="'+o.siteName+'" size="20" />';
		cidu.innerHTML = '<input name="url" type="text" require="1"  value="'+o.url+'" size="30" />';
		cidt.innerHTML = '<input name="taxis" type="text" require="1" dataType="nums" value="'+o.taxis+'" size="4" />';
		action.innerHTML = '<input type="submit" value="更改" />  <input onclick="modifyManageSort('+id+')" type="button" value="取消" />';
	}
	oo[id] = o;
};
$("input.submitMini")
	.mouseover(function(){this.className='submitMiniOver'})
	.mouseout(function(){this.className='submitMini'});
document.title = $("b.FT14","div.SubMainTitle").html().trim()+"_"+document.title

if(typeof XypForm == "undefined")
{
	include.js(__scfg__.staticUrl+"xypfrom/xypfrom.js");
	include.css(__scfg__.staticUrl+"xypfrom/xypfrom.css");
}
</script>